#define _CRT_SECURE_NO_WARNINGS 1
#include<stdio.h>
int main()
{
	int arr[] = { 1,2,3,4,5,6,7,8,9,10 };
	int sz = sizeof(arr) / sizeof(arr[0]);
	int arr1[10] = { 0 };
	int arr2[10] = { 0 };
	int k = 0;
	int j = 0;
	for (int i = 0; i<= sz; i++)
	{

		if (arr[i] % 2 == 0)
		{
			if (j < 10)
			{
				arr1[j] = arr[i];
				j++;
			}
		}
		/*{

			arr1[j] = arr[i];
			j++;
		}*/
			else
			{
				if (k < 10)
				{
					arr2[k] = arr[i];
					k++;
				}
			}
			
		/*{

			arr2[k] = arr[i];
			k++;
		}*/
	}
	int arr3[20];
	int l = 0;
	for (int i = 0; i < k; i++)
	{
		arr3[l] = arr2[i];
		l++;
	}
	for (int i = 0; i < j; i++)
	{
		arr3[l] = arr1[i];
		l++;
	}

	for (int i = 0; i < sz; i++)
	{
		printf("%d,", arr3[i]);
	}
	return 0;
}